/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package podologia.beansDB;

import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author Hernan
 */
@Embeddable
public class PracticaxempleadoPK implements Serializable {
    @Column(name = "idPractica", nullable = false)
    private int idPractica;
    @Column(name = "legajo", nullable = false)
    private int legajo;

    public PracticaxempleadoPK() {
    }

    public PracticaxempleadoPK(int idPractica, int legajo) {
        this.idPractica = idPractica;
        this.legajo = legajo;
    }

    public int getIdPractica() {
        return idPractica;
    }

    public void setIdPractica(int idPractica) {
        this.idPractica = idPractica;
    }

    public int getLegajo() {
        return legajo;
    }

    public void setLegajo(int legajo) {
        this.legajo = legajo;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) idPractica;
        hash += (int) legajo;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof PracticaxempleadoPK)) {
            return false;
        }
        PracticaxempleadoPK other = (PracticaxempleadoPK) object;
        if (this.idPractica != other.idPractica) {
            return false;
        }
        if (this.legajo != other.legajo) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "podologia.beansDB.PracticaxempleadoPK[idPractica=" + idPractica + ", legajo=" + legajo + "]";
    }

}
